package com.woniu.HisHospitalizationApiImpl;

import com.woniu.HisHospitalizationApi.HisHospitalRecordsApi;
import com.woniu.dto.HisBedDto;
import com.woniu.dto.HisHospitalRecordsDto;
import com.woniu.dto.PageDTO;
import com.woniu.exception.DIYException;
import com.woniu.mapper.HisHospitalRecordsMapper;
import com.woniu.model.HisHospitalRecords;
import com.woniu.param.HisHospitalRecordsAddParam;
import com.woniu.param.HisHospitalRecordsParam;
import com.woniu.service.IHisHospitalRecordsService;
import com.woniu.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
@Slf4j
public class HisHospitalRecordsApiImpl implements HisHospitalRecordsApi {
    @Resource
    private HisHospitalRecordsMapper hisHospitalRecordsMapper;
    @Resource
    private IHisHospitalRecordsService hisHospitalRecordsService;

    @Override
    public Result<PageDTO<HisHospitalRecordsDto>> getAllHisHospitalRecords() {
        return null;
    }

    @Override
    public Result<PageDTO<HisHospitalRecordsDto>> getHisHospitalRecordsBy(HisHospitalRecordsParam hisHospitalRecordsParam) {
        return hisHospitalRecordsService.getHisHospitalRecordsBy(hisHospitalRecordsParam);
    }

    @Override
    public Result<HisHospitalRecordsDto> updateHisHospitalRecords(HisHospitalRecordsParam hisHospitalRecordsParam) {
        return hisHospitalRecordsService.updateHisHospitalRecords(hisHospitalRecordsParam);
    }

    @Override
    public Result<HisHospitalRecordsDto> addHisHospitalRecords(HisHospitalRecordsAddParam hisHospitalRecordsAddParam) {
       return hisHospitalRecordsService.addHisHospitalRecords(hisHospitalRecordsAddParam);
    }
}
